package com.xiaokaceng.openci.web.controller.toolconfiguration;

import org.dayatang.querychannel.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xiaokaceng.openci.domain.RedmineConfiguration;
import com.xiaokaceng.openci.web.dto.ResultDto;

@Controller
@RequestMapping("/redmineconfiguration")
public class RedmineConfigurationController extends ToolConfigurationBaseController {

	@ResponseBody
	@RequestMapping("/create")
	public ResultDto createRedmineConfiguration(RedmineConfiguration redmineConfiguration) {
		toolConfigurationApplication.createConfiguration(redmineConfiguration);
		return ResultDto.createSuccess();
	}

	@ResponseBody
	@RequestMapping("/update")
	public ResultDto updateRedmineConfiguration(RedmineConfiguration redmineConfiguration) {
		toolConfigurationApplication.updateConfiguration(redmineConfiguration);
		return ResultDto.createSuccess();
	}

	@ResponseBody
	@RequestMapping("/pagingquery")
	public Page<RedmineConfiguration> pagingQuery(int page, int pagesize) {
		return toolConfigurationApplication.pagingQeuryRedmineConfigurations(page, pagesize);
	}
	
}
